import type {TableHeader , operationInstance} from "@/components/dzs-table/@types";
import type { children } from "@/components/dzs-form/@types";

export const TABALE_HEADER:TableHeader[] = [
    {
        label: "路由标题",
        key: "title"
    },
    {
        label: "路由名称",
        key: "name"
    },
    {
        label: "路由路径",
        key: "path"
    },
    {
        label: "路由组件",
        key: "component",
        props : {
            "show-overflow-tooltip" : true
        }
    },
    {
        label: "排序",
        key: "sorts",
        width : "60px"
    },
    {
        label: "是否展示",
        key: "is_show",
        width : "100px",
        props : {
            formatter : (row : Record<string, any>) => {
                return row.is_show ? "是" : "否";
            }
        }
    },
    {
        label: "更新时间",
        key: "updatetime",
    },
    {
        label: "创建时间",
        key: "createdtime",
    },
    {
        label : "操作人",
        key  : "username",
        width : "100px"
    }
];

export const operation : Array<operationInstance> = ["edit", 'delete' , 'detail'];

/**类型列表*/ 
export const typeList : children[] = [
    { label : "目录", value : '1' },
    { label : "菜单", value : '2' },
    { label : "外连接", value : '3' },
];